package com.my.entity;

import com.my.annotation.NotNull;

/**
 * mankind实体类
 */
public class Human {

	@NotNull(fieldName = "姓名", needBao = false)
	private String name;
	
	@NotNull(fieldName = "性别", needBao = false)
	private Boolean sex;  // Ture=Male(♂) False=Female(♀)
	
	/**
	 * 若needBao=true,则不对该属性进行非空校验
	 */
	@NotNull(fieldName = "年龄", needBao = true)
	private Integer age;
	
	public Human(){}
	
	public Human(String name, Boolean sex){
		this.name = name;
		this.sex = sex;
	}

	public Human(String name, Boolean sex, Integer age){
		this.name = name;
		this.sex = sex;
		this.age = age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Boolean getSex() {
		return sex;
	}

	public void setSex(Boolean sex) {
		this.sex = sex;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	@Override
	public String toString() {
		return "Human [name=" + name + ", sex=" + sex + ", age=" + age + "]";
	}
	
}
